﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using XtremBiking.Recursos;


namespace XtremBiking.Web.Models.Usuarios
{
    public class LogInUser
    {
        /// <summary>
        /// Gets or sets login name (or user name)
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "LoginNameRequired", ErrorMessageResourceType = typeof(XtremBiking.Recursos.Modelos.Usuarios.LogInUser))]
        [Display(Name = "DisplayLoginName", ResourceType = typeof(XtremBiking.Recursos.Modelos.Usuarios.LogInUser))]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessageResourceName = "EmailNotValid", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        [StringLength(50, ErrorMessageResourceName = "MailMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]        
        public string Email { get; set; }

        /// <summary>
        /// Gets or sets user password
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "PasswordRequired", ErrorMessageResourceType = typeof(XtremBiking.Recursos.Modelos.Usuarios.LogInUser))]
        [DataType(DataType.Password)]
        [Display(Name = "DisplayPassword", ResourceType = typeof(XtremBiking.Recursos.Modelos.Usuarios.LogInUser))]
        public string Password { get; set; }
    }
}